/*
* @author dumeng
*/
'use strict'
import request from '@/utils/request'
/**
 * 课程列表查询
 */
export function queryCoursePage(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/courseInfo/queryPage',
    method: 'POST',
    data
  })
}
/**
 * 查询人物库中的讲师
 * @param {*} data
 */
export function queryUserRole(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/craftsmanLibrary/queryPage',
    method: 'post',
    data
  })
}
/**
 * 删除
 */
export function deleteCourse(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/courseInfo/deleteById',
    method: 'POST',
    data
  })
}
/**
 * 批量设置分类
 */
export function batchClassification(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/courseInfo/updateClassify',
    method: 'POST',
    data
  })
}
/**
 * 获取分类树形列表
 */
export function getClassifyTree(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/learnClassify/getClassifyTree',
    method: 'POST',
    data
  })
}
/**
 * 课程上下架
 */
export function rackUpAndDown(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/courseInfo/rackUpAndDown',
    method: 'POST',
    data
  })
}

/**
 * 字典
 */
export function getDictByCode(dictCode) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/sysDictionary/getDictByCode',
    method: 'POST',
    data: {
      dictCode
    }
  })
}
export function fetchList(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/subject/queryPage',
    method: 'POST',
    data
  })
}
// 设置标签
export function setTags(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/courseInfo/setCourseTag',
    method: 'POST',
    data
  })
}
// 获取标签
export function getCourseTag(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/courseInfo/getCourseTag',
    method: 'POST',
    data
  })
}
/**
 * 查询课件
 */
export function queryList(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/courseInfo/querySubject',
    method: 'POST',
    data
  })
}
